package cn.stylefeng.guns.orderitem.model.param;

import cn.stylefeng.guns.core.pojo.base.param.BaseParam;

import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;

/**
 * order_item
 *
 * @author aria
 * @date 2021/02/20 20:24
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class OrderItemParam extends BaseParam {

    /**
     * 订单项号
     */
    @NotNull(message = "订单项号不能为空",groups = {edit.class})
    private Integer itemId;

    /**
     * 订单号
     */
    @NotNull(message = "订单号不能为空",groups = {add.class,edit.class})
    private Integer orderId;

    /**
     * 商品编号
     */
    @NotNull(message = "商品编号不能为空",groups = {add.class,edit.class})
    private Integer goodsId;

    /**
     * 商品图片
     */
    @NotNull(message = "商品图片不能为空",groups = {add.class,edit.class})
    private String goodsImage;

    /**
     * 商品名称
     */
    @NotNull(message = "商品名称不能为空",groups = {add.class,edit.class})
    private String goodsName;

    /**
     * 商品价格
     */
    @NotNull(message = "商品价格不能为空",groups = {add.class,edit.class})
    private Double goodsPrice;

    /**
     * 商品说明文字描述
     */
    @NotNull(message = "商品说明文字描述不能为空",groups = {add.class,edit.class})
    private String desc;

    /**
     * 购买数量
     */
    @NotNull(message = "购买数量不能为空",groups = {add.class,edit.class})
    private Integer itemNum;

}
